Analyzing Trends in House of Representatives

INFO 526 - Project 1

Author

The Power of The Voters

Abstract

This study explores US House election results from 1976 to 2022, focusing on US House of Representative trends from 2016-2022, and state-wide trends in Arizona from 2012-2022. From 2016-2020, the data was wrangled into three subsets, one for each cycle. To simplify the analysis, all parties that are outside of Republican and Democrat were grouped into a new generalized party called “Other”. These subsets were then displayed on a US map, where the fill of the state indicates which party has the house majority, while the label of the state indicates which party had the popular vote majority. This revealed insights into how the electoral system can lead to politicians that may not represent the sentiment of the population of the state. Zooming in on the state of Arizona, voting trends were analyzed over a longer time frame of 10 years, from 2012 to 2022. The mode of voting as well as the change in party in each district was visualized to create insights into how mode of voting will influence the winning candidate, and how that influences the winning party in each district.

Insights into voting trends are very important metrics for politicians and the general population as it can be directly be related to other aspects of life such as the economy and global politics. These insights can then help politicians target states where voter sentiment can make or break a politicians campaign.

The analysis focused on time-series analysis as the variables were view over time and the changes noted as valuable insights. The limitations for this project include the assumption that the conglomeration of minor parties will create a larger third party that will vote different from Democrat and Republican, though this is not the case in real life, where some minor parties will align closer to the larger parties and some will votes on their own ideas. Ulitmately, This study provides insights into US voting patterns and the impact of election results on future voting trends.

Introduction

Introducing the Dataset

The dataset, US House Election Results is sourced from MIT Election Data and Science Lab (MEDSL), offers a comprehensive overview of US House elections.

This dataset contains observations for elections held over 47 years from 1976 to 2022, encompassing a total of 32,452 recorded events. Each event is represented as a row with 20 attributes as columns. These columns provide details including the year, state, district, political party, candidate’s name, votes received, and various indicators such as whether it was a runoff election or if it was a write-in candidate. In the US, the House of Representatives are elected in districts in each state. The number of districts in a state is representative of the population of a state.

EDA

Summary Statistics for Dataset

Summary Statistics for year :
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
   1976    1988    2000    2000    2012    2022 

Summary Statistics for state :
   Length     Class      Mode 
    32452 character character 

Summary Statistics for state_po :
   Length     Class      Mode 
    32452 character character 

Summary Statistics for state_fips :
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
   1.00   17.00   31.00   28.76   40.00   56.00 

Summary Statistics for state_cen :
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
  11.00   23.00   52.00   50.95   74.00   95.00 

Summary Statistics for state_ic :
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
   1.00   14.00   40.00   37.09   52.00   82.00 

Summary Statistics for office :
   Length     Class      Mode 
    32452 character character 

Summary Statistics for district :
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
  0.000   3.000   6.000   9.848  13.000  53.000 

Summary Statistics for stage :
   Length     Class      Mode 
    32452 character character 

Summary Statistics for runoff :
     Min.   1st Qu.    Median      Mean   3rd Qu.      Max. 
0.0000000 0.0000000 0.0000000 0.0002465 0.0000000 1.0000000 

Summary Statistics for special :
    Min.  1st Qu.   Median     Mean  3rd Qu.     Max. 
0.000000 0.000000 0.000000 0.002773 0.000000 1.000000 

Summary Statistics for candidate :
   Length     Class      Mode 
    32452 character character 

Summary Statistics for party :
   Length     Class      Mode 
    32452 character character 

Summary Statistics for writein :
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
0.00000 0.00000 0.00000 0.08412 0.00000 1.00000 

Summary Statistics for mode :
   Length     Class      Mode 
    32452 character character 

Summary Statistics for candidatevotes :
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
     -1    4324   57328   66825  112144 1165136 

Summary Statistics for totalvotes :
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
     -1  162266  206983  215165  263386 2656104 

Summary Statistics for unofficial :
    Min.  1st Qu.   Median     Mean  3rd Qu.     Max. 
0.000000 0.000000 0.000000 0.001202 0.000000 1.000000 

Summary Statistics for version :
    Min.  1st Qu.   Median     Mean  3rd Qu.     Max. 
20230706 20230706 20230706 20230706 20230706 20230706 

Summary Statistics for fusion_ticket :
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
0.00000 0.00000 0.00000 0.08135 0.00000 1.00000 

Summary Statistics for State_Population :
   Length     Class      Mode 
    32452 character character 
No columns have null values.

Question 2 : How often did change occur in House representation from the years 2012-2022 in the state of Arizona and which voting methods played a significant role in these elections?

Introduction.

This question seeks to achieve two objectives: firstly, to identify recurring patterns in Arizona’s House representation, and secondly, to examine the impact of different voting methods on election outcomes. We have utilized comprehensive data on House elections in Arizona spanning from 2012 to 2022 to answer this question. This dataset contains details regarding the voting methods employed, election results, party affiliations, districts, and the total votes garnered by each candidate. Through scrutinizing fluctuations in House representation, we aim to gain deeper insights into Arizona’s political landscape. Simultaneously, analyzing voting techniques allows us to assess the fairness of elections and devise strategies to increase voter participation.

Approach

Analysis

<<<<<<< HEAD The analysis will look at election results from 2012, 2016, and 2022 to see how Arizona’s congressional district alignments have changed over time. The goal is to identify patterns of political representation inside the state’s districts, detecting movements in party control over both short-term and decade-long periods. Furthermore, the analysis will look into the influence of various voting procedures, specifically their impact on election outcomes in Arizona.

Arizona Congressional District Maps

<<<<<<< HEAD The resultant visualization is a color-coded map of Arizona’s congressional districts in 2012, based on the political party that won each seat. Each district is assigned a color that represents the winning party blue for Democrats and red for Republicans.The representation offers a visual picture of Arizona’s political distribution in 2012, highlighting regions of Democratic and Republican strength and providing insights into regional political processes. This localisation reveals the political leaning of most of the congressional districts in Arizona during that election cycle was towards the Democratic party. One key feature of the 2016 and 2022 visualizations is the use of transparency to highlight shifts in political representations. Districts with a party change are displayed with a lower opacity, distinguishing them from those with no change, which keep full-color saturation. The 2016 visualization reveals that the political leaning of 6th congressional district has changed from Democratic party to Republican party.The 2022 visualization reveals that the political leaning of 1st and 9th districts has changed from Democratic party to Republican party. Additionally, 4th congressional district has changed from Republican party to Democratic party. =======

::: {.cell}

:::

f2c9b4ccef533d148e75285d35ccbd68e077f8bc

The resultant visualisation is a color-coded map of Arizona’s congressional districts in 2012, based on the political party that won each seat. Each district is assigned a colour that represents the winning party: blue for Democrats and red for Republicans. The representation offers a visual picture of Arizona’s political distribution in 2012, highlighting regions of Democratic and Republican strength and providing insights into regional political processes. This visualisation reveals the political leaning of most of the congressional districts in Arizona during that election cycle was towards the Democratic party.

The resultant visualisation is a color-coded map of Arizona’s congressional districts in 2016, based on the political party that won each seat. Each district is assigned a colour that represents the winning party: blue for Democrats and red for Republicans. One key feature of this visualisation is the use of transparency to highlight shifts in political representations. Districts with a party change are displayed with a lower opacity, distinguishing them from those with no change, which keep full-colour saturation. This visualisation reveals that the political leaning of 6th congressional district during the 2016 election cycle has changed from Democratic party to Republican party.

The resultant visualisation is a color-coded map of Arizona’s congressional districts in 2022, based on the political party that won each seat. Each district is assigned a colour that represents the winning party: blue for Democrats and red for Republicans. One key feature of this visualisation is the use of transparency to highlight shifts in political representations. Districts with a party change are displayed with a lower opacity, distinguishing them from those with no change, which keep full-colour saturation. This visualisation reveals that the political leaning of 1st and 9th districts has changed from Democratic party to Republican party.4th congressional district has changed from Republican party to Democratic party.

Discussion

An interesting trend emerges from examining Arizona’s congressional district maps: the political setting rarely changes over brief periods, such as between two elections that happened just a few years apart(2012 and 2016). This consistency points strong party loyalty at these times. But a decade of observation tells a different story: there are notable changes in party representation in different districts. This discovery highlights a slow but significant shift in voter attitude and party affiliations. Even though it is rare for districts to switch parties in the course of one or two election cycles, a ten-year period shows a dynamic and ever-changing political landscape. This long-term perspective on the ups and downs of political change allows for a better understanding of the complexity and gradual alterations in voter preferences and party power.

ANY CODE BELOW THIS SECTION ADD TO THE ABOVE SECTIONS

Analyzing and filtering Arizona’s vote data from 2012 to 2022, brings emphasis on the various methods of voting and how it effects the outcomes of candidates. By focusing on particular details—year, voting type, and election results—it determines both the frequency and percentage of each vote result. This data allows to visualize the Arizona district electoral evolution over that decade.

The resultant visualization is a color-coded map of Arizona’s congressional districts in 2012, based on the political party that won each seat. Each district is assigned a color that represents the winning party: blue for Democrats and red for Republicans. The representation offers a visual picture of Arizona’s political distribution in 2012, highlighting regions of Democratic and Republican strength and providing insights into regional political processes. This localisation reveals the political leaning of most of the congressional districts in Arizona during that election cycle was towards the Democratic party.

The resultant visualization is a color-coded map of Arizona’s congressional districts in 2016, based on the political party that won each seat. Each district is assigned a color that represents the winning party: blue for Democrats and red for Republicans. One key feature of this visualization is the use of transparency to highlight shifts in political representations. Districts with a party change are displayed with a lower opacity, distinguishing them from those with no change, which keep full-color saturation. This visualization reveals that the political leaning of 6th congressional district during the 2016 election cycle has changed from Democratic party to Republican party.

The resultant visualization is a color-coded map of Arizona’s congressional districts in 2022, based on the political party that won each seat. Each district is assigned a color that represents the winning party: blue for Democrats and red for Republicans. One key feature of this visualization is the use of transparency to highlight shifts in political representations. Districts with a party change are displayed with a lower opacity, distinguishing them from those with no change, which keep full-color saturation. This visualization reveals that the political leaning of 1st and 9th districts has changed from Democratic party to Republican party.4th congressional district has changed from Republican party to Democratic party.

Discussion

The visual representation of the data offers a detailed description of election outcomes by voting type from 2012 to 2022, distinguishing between victories and defeats through color-coded bars and labeled percentages. An interesting trend emerges from examining Arizona’s congressional district maps: while the political setting remains relatively stable over short periods, such as between elections just a few years apart, a decade-long observation reveals significant changes in party representation across districts, indicating shifts in voter attitudes and party affiliations. The analysis of Arizona’s electoral data over the past decade shows varying success rates for conventional voting methods, with a significant decline in 2020 followed by a notable recovery in 2022. In contrast, candidates utilizing write-in approaches consistently faced electoral setbacks year after year. This highlights the ongoing difficulty write-in candidates face in gaining political success in Arizona, despite traditional voting procedures maintaining dominance. These visual representations provide valuable insights into evolving political dynamics and voter preferences within the state.